package com.openvas.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.openvas.commons.common.annotation.Excel;
import com.openvas.commons.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;


/**
 * 配置对象 table_config
 * 
 * @author ruoyi
 * @date 2021-11-04
 */
public class TableConfig extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Long id;

    /** 配置的所有者 */
    @Excel(name = "配置的所有者")
    private String owner;

    /** 配置名称 */
    @Excel(name = "配置名称")
    private String name;

    /** 备注 */
    @Excel(name = "备注")
    private String comment;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date creationTime;

    /** 修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date modificationTime;

    /** 配置选择的家庭数量 */
    @Excel(name = "配置选择的家庭数量")
    private Integer familyCount;

    /** 配置选择的 NVT 数量 */
    @Excel(name = "配置选择的 NVT 数量")
    private Integer nvtCount;

    /** 配置的类型 （0 = OpenVAS, 1 OSP） */
    @Excel(name = "配置的类型 ", readConverterExp = "0=,==,O=penVAS,,1=,O=SP")
    private Integer type;

    /** 配置的使用类型（scan 或者 policy） */
    @Excel(name = "配置的使用类型", readConverterExp = "s=can,或=者,p=olicy")
    private String usageType;

    /** 用户名称 */
    @Excel(name = "用户名称")
    private String userName;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setOwner(String owner) 
    {
        this.owner = owner;
    }

    public String getOwner() 
    {
        return owner;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setComment(String comment) 
    {
        this.comment = comment;
    }

    public String getComment() 
    {
        return comment;
    }
    public void setCreationTime(Date creationTime) 
    {
        this.creationTime = creationTime;
    }

    public Date getCreationTime() 
    {
        return creationTime;
    }
    public void setModificationTime(Date modificationTime) 
    {
        this.modificationTime = modificationTime;
    }

    public Date getModificationTime() 
    {
        return modificationTime;
    }
    public void setFamilyCount(Integer familyCount) 
    {
        this.familyCount = familyCount;
    }

    public Integer getFamilyCount() 
    {
        return familyCount;
    }
    public void setNvtCount(Integer nvtCount) 
    {
        this.nvtCount = nvtCount;
    }

    public Integer getNvtCount() 
    {
        return nvtCount;
    }
    public void setType(Integer type) 
    {
        this.type = type;
    }

    public Integer getType() 
    {
        return type;
    }
    public void setUsageType(String usageType) 
    {
        this.usageType = usageType;
    }

    public String getUsageType() 
    {
        return usageType;
    }
    public void setUserName(String userName) 
    {
        this.userName = userName;
    }

    public String getUserName() 
    {
        return userName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("owner", getOwner())
            .append("name", getName())
            .append("comment", getComment())
            .append("creationTime", getCreationTime())
            .append("modificationTime", getModificationTime())
            .append("familyCount", getFamilyCount())
            .append("nvtCount", getNvtCount())
            .append("type", getType())
            .append("usageType", getUsageType())
            .append("userName", getUserName())
            .toString();
    }
}
